package com.example.business_oa.service;

import com.example.comment_oa.dubbo.BusiDubbo;
import com.example.comment_oa.dubbo.HoliDubbo;
import com.example.comment_oa.pojos.attendance.BusinessTripAp;
import com.example.comment_oa.pojos.attendance.HolidayAp;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public class HoliService {

    @DubboReference(version = "1.0.0")
    HoliDubbo holiDubbo;
    //ap
    @GlobalTransactional(timeoutMills = 300000)
    public int apBusi(HolidayAp holidayAp, MultipartFile file){return holiDubbo.apHoli(holidayAp,file);}
    //同意请假
    @GlobalTransactional(timeoutMills = 300000)
    public int yesBusi(String busiId,String yesUser){return holiDubbo.yesHoli(busiId,yesUser);}
    //拒绝请假
    @GlobalTransactional(timeoutMills = 300000)
    public int noBusi(String busiId,String yesUser){return holiDubbo.noHoli(busiId,yesUser);}

}
